﻿from nicegui import ui
from epAggrid import epAggrid


@ui.page("/")
def page():
    epAggrid(
        {
            "columnDefs": [
                {"field": "make", "rowGroup": True, "hide": True},
                {"field": "model"},
                {"field": "price"},
            ],
            "rowData": [
                {"make": "Toyota", "model": "Celica", "price": 35000},
                {"make": "Ford", "model": "Mondeo", "price": 32000},
                {"make": "Porsche", "model": "Boxster", "price": 72000},
                {"make": "Toyota", "model": "Corolla", "price": 29600},
                {"make": "Ford", "model": "Fiesta", "price": 18000},
                {"make": "Porsche", "model": "Cayman", "price": 54000},
            ],
        }
    )


ui.run()
